#include "showsalesinfoform.h"
#include "ui_showsalesinfoform.h"

showSalesInfoForm::showSalesInfoForm(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::showSalesInfoForm)
{
    ui->setupUi(this);
}

showSalesInfoForm::showSalesInfoForm(const QString &date, const QString &time, const QString &name,
    const double singlePrice, const QString &saleNum, const double buyinPrice, const QString &staffName,
                                     const int repertory, QWidget *parent):
    QWidget(parent),
    ui(new Ui::showSalesInfoForm)
{
   ui->setupUi(this);
   ui->timeLabel_2->setText(date);
   ui->timeLabel->setText(time);
   ui->goodsLabel->setText(name);
   ui->priceLabel->setText(QString::number(singlePrice,10,2));
   ui->numLabel->setText(saleNum);
   ui->buyCostLabel->setNum(buyinPrice);
   ui->staffLabel->setText(staffName);
   ui->repertoryLabel->setNum(repertory);
   ui->profitLabel_2->setNum(singlePrice-buyinPrice);


}

showSalesInfoForm::~showSalesInfoForm()
{
    delete ui;
}
